<?php
namespace addon\cms\logic;
use app\common\logic\LogicBase;
use tpfcore\Core;
use \tpfcore\util\Config;

class MiniSetting extends LogicBase
{

    public function saveMiniSetting($data){
        foreach ($data as $key => $value) {
            $update_config['mimi_program']['setting'][$key]=$value;
        }

        unset($data);

        Config::mult_array_merge(APP_PATH."extra/config.php",$update_config);

        return [0,"操作成功",null];

    }
    public function getMiniSetting(){
        return config("config.mimi_program")['setting'];
    }
}